<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-10-10 15:06:01
         compiled from "D:\WebApplication\myconpany\sumi_mobile\application\views\common\headerMenu.html" */ ?>
<?php /*%%SmartyHeaderCode:288925618b8d9919560-36837048%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a8b28a511cc5a91055bb45b5f0c30393bd089636' => 
    array (
      0 => 'D:\\WebApplication\\myconpany\\sumi_mobile\\application\\views\\common\\headerMenu.html',
      1 => 1444295428,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '288925618b8d9919560-36837048',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.21-dev',
  'unifunc' => 'content_5618b8d99d9870_06081089',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5618b8d99d9870_06081089')) {function content_5618b8d99d9870_06081089($_smarty_tpl) {?><div class="main-header">
    <a href="javascript:history.back();" class="backwrap"></a>
    <div class="center-wrap">
        <div class="center-m">
            <p class="curr" v="1">现货</p>
         <ul class="center-list">
             <li  v="1"><a href="#">现货</a></li>
             <li v="2"><a href="#">求购</a></li>
             <li v="3"><a href="#">供应</a></li>
         </ul>
        </div>
        <input type="text" placeholder="请输入牌号搜索" onclick="javascript:search();" value="" class="cer_search" name="keyWord" id="keyWord">
        <input class="serch_btn search-btn" type="submit" value="搜索"/>
       
   
    </div>
</div>

<?php echo '<script'; ?>
 typte="text/javascript">
    $(function(){
        $('.center-m p').click(function(){
            $('.center-list').show();
        });
         $('.center-list li').click(function(){
             var oTex = $(this).find('a').text();
             var attr = $(this).attr('v');
             $('.center-m p').attr('v',attr);
             $('.center-m p').text(oTex);
             $('.center-list').hide();
         });
    });

    /* 搜索按钮 */
    $('.search-btn').click(function(){
        var keyword = $('.cer_search').val();
        var tag_val =  $('.center-m>.curr').attr("v");

        if($('.cer_search').val() == '') return;
        if(!$.trim($('.cer_search').val())) {
            return;
        }
        searchKD(tag_val,keyword);
    });

    function searchKD(tag_val,keyword)
    {
        if(tag_val == 1){
            var url = "/search/index/keyword/"+keyword;
        }
        if(tag_val == 2){
            var url ="/buy/index/keyword/"+keyword
        }
        if(tag_val == 3){
            var url ="/supply/index/keyword/"+keyword
        }
        window.location = url;
    }
<?php echo '</script'; ?>
><?php }} ?>
